home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / comm / cnet / Greed2_0.lha / Greed / _GreedWelcome < prev    next >
Text File  |  1995-03-07  |  2KB  |  56 lines

  1. /* $VER: GreedWelcome v2.0 (1/15/94) */
  2. /*******************************/
  3. /*  GreedWelcome               */
  4. /*   Log-in "welcome" for Greed*/
  5. /*   Displays News:GreedNews   */
  6. /*   for each user on their    */
  7. /*   first log-in after winners*/
  8. /*   are awarded each maint.   */
  9. /*******************************/
  10.  
  11. options results ; signal on SYNTAX ; signal on ERROR ; signal on IOERR
  12. gu = getuser
  13.  
  14. call GetPaths
  15.  
  16. INIT:
  17. if ~exists(GreedPath||'GreedNewsDate') | ~exists(NewsFile) then exit
  18.  
  19. call open(f1,GreedPath||'GreedNewsDate','r') ; newsdate=readln(f1) ; call close(f1)
  20.  
  21. gu 11 ; lastdate=result
  22.  
  23. month=substr(newsdate,8,3) ; call GETMONTH
  24. ndt=substr(newsdate,12,4)||month||substr(newsdate,5,2)||substr(newsdate,17,5)
  25. month=substr(lastdate,8,3) ; call GETMONTH
  26. ldt=substr(lastdate,12,4)||month||substr(lastdate,5,2)||substr(lastdate,17,5)
  27.  
  28. if ldt > ndt then signal DONE
  29.  
  30. SENDIT:
  31. sendfile NewsFile
  32. DONE:
  33. exit
  34.  
  35. GETMONTH:
  36. if month='Jan' then do ; month='01' ; return ; end
  37. if month='Feb' then do ; month='02' ; return ; end
  38. if month='Mar' then do ; month='03' ; return ; end
  39. if month='Apr' then do ; month='04' ; return ; end
  40. if month='May' then do ; month='05' ; return ; end
  41. if month='Jun' then do ; month='06' ; return ; end
  42. if month='Jul' then do ; month='07' ; return ; end
  43. if month='Aug' then do ; month='08' ; return ; end
  44. if month='Sep' then do ; month='09' ; return ; end
  45. if month='Oct' then do ; month='10' ; return ; end
  46. if month='Nov' then do ; month='11' ; return ; end
  47. month='12' ; return
  48.  
  49. SYNTAX:
  50. ERROR:
  51. IOERR:
  52. transmit "Error. @ "||sigl||" in GreedWelcome."
  53. bufferflush ; exit
  54.  
  55. GetPaths:
  56.